//package com.plian.system.controller.pm.listedcompany;
//
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.base.BaseController;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.config.Resubmit;
//import com.plian.system.entity.pm.listedcompany.ListedFirmInfo;
//import com.plian.system.model.CommonCode;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.model.token.PassToken;
//import com.plian.system.mybatis.search.SearchEntity;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.pm.listedcompany.IListedFirmInfoService;
//import com.plian.system.vo.pm.listedcompany.ListedFirmInfoVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.AllArgsConstructor;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
//import javax.servlet.http.HttpServletResponse;
//import javax.validation.Valid;
//import java.io.OutputStream;
//import java.util.List;
//
//@RestController
//@AllArgsConstructor
//@RequestMapping("api/listedfirminfo")
//@Api(value = "ListedFirmInfoController", tags = "上市公司信息 控制器")
//public class ListedFirmInfoController extends BaseController {
//
//    private final IListedFirmInfoService listedFirmInfoService;
//
//    @PostMapping("/detail")
//    @ApiOperation(value = "详情", notes = "传入 listedFirmInfo")
//    public R<ListedFirmInfoVO> detail(@RequestBody ListedFirmInfo listedFirmInfo) {
//        return R.data(listedFirmInfoService.getDetailObj(listedFirmInfo));
//    }
//
//    @PostMapping("/list")
//    @ApiOperation(value = "分页", notes = "传入query")
//    public ListResult<ListedFirmInfoVO> list(@RequestBody Query query) {
//        List<SearchEntity> entityList = query.getSearch();
//        return listedFirmInfoService.list(query);
//    }
//
//    @PostMapping("/submit")
//    @Resubmit(delaySeconds = 0)
//    @ApiOperation(value = "新增或调整", notes = "传入 listedFirmInfo")
//    public R<ListedFirmInfo> submit(@Valid @RequestBody ListedFirmInfo listedFirmInfo) {
//        boolean result = listedFirmInfoService.submit(listedFirmInfo);
//        return result ? R.data(listedFirmInfo) : new R(CommonCode.FAIL);
//    }
//
//    @PostMapping("/remove")
//    @ApiOperation(value = "删除", notes = "传入 ids")
//    public R remove(@RequestBody PageData pd) {
//        List<String> ids = (List<String>)pd.get("ids");
//        return listedFirmInfoService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA)))
//                ? new R(CommonCode.SUCCESS) : new R(CommonCode.FAIL);
//    }
//
//    @GetMapping("/exportTemplateExcel")
//    @PassToken
//    public void exportTemplateExcel(HttpServletResponse response, OutputStream os){
//        listedFirmInfoService.exportTemplateExcel(response, os);
//    }
//
//    @PostMapping(value = "/uploadFile",produces="application/json;charset=UTF-8")
//    @ApiOperation(value = "导入", notes = "传入导入文件")
//    public R uploadFile(@RequestParam("file") MultipartFile multipartFile){
//        listedFirmInfoService.uploadFile(multipartFile);
//        return R.success();
//    }
//
//
//}
